From 6a14fdf92048ef07ba8e10bde3b175e79152f94f Mon Sep 17 00:00:00 2001 From: Anil Madhavapeddy Date: Thu, 24 Nov 2011 19:09:55 +0000 Subject: [PATCH] libvchan: fix segfault in client error path In libvchan_client_init, go to the error path if the gntdev device is not available. Otherwise, a segfault happens later as the vchan context is invalid. Signed-off-by: Anil Madhavapeddy Committed-by: Ian Jackson --- tools/libvchan/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libvchan/init.c b/tools/libvchan/init.c index becf71d2ab..acaddd5b04 100644 --- a/tools/libvchan/init.c +++ b/tools/libvchan/init.c @@ -385,7 +385,7 @@ struct libxenvchan *libxenvchan_client_init(xentoollog_logger *logger, int domai ctrl->gnttab = xc_gnttab_open(logger, 0); if (!ctrl->gnttab) - goto out; + goto fail; // set up event channel if (init_evt_cli(ctrl, domain, logger)) -- 2.30.2